<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>amCharts Example</title>
    </head>
    
    <body style="background-color:#EEEEEE">
        <!-- This script will display JavaScript charts if browser supports SVG, and only if it doesn't will display Flash version. -->
        <!-- saved from url=(0013)about:internet -->
        <!-- amcharts script-->
        <!-- swf object (version 2.2) is used to detect if flash is installed and include swf in the page -->
        <script type="text/javascript" src="../../amcharts/flash/swfobject.js"></script>
        
        <!-- following scripts required for JavaScript version. The order is important! -->
        <script type="text/javascript" src="../../amcharts/javascript/amcharts.js"></script>
        <script type="text/javascript" src="../../amcharts/javascript/amfallback.js"></script>
        <script type="text/javascript" src="../../amcharts/javascript/raphael.js"></script>
        
        <!-- chart is placed in this div. if you have more than one chart on a page, give unique id for each div -->
        <div id="chartdiv" style="width:600px; height:400px; background-color:#FFFFFF"></div>
        
        <script type="text/javascript">
            
            var params = 
            {
                bgcolor:"#FFFFFF"
            };
            
            var flashVars = 
            {
                path: "../../amcharts/flash/",
                
                /* in most cases settings and data are loaded from files, but, as this require
                 all the files to be upladed to web server, we use inline data and settings here.*/
                 
                // settings_file: "../sampleData/column_settings.xml",
                // data_file: "../sampleData/column_data.xml"
                
                chart_data: "<chart><graphs><graph gid='0'><point x='154' y='45' value='112'/><point x='187' y='85' value='155'/><point x='198' y='32' value='160'/><point x='224' y='12' value='95'/><point x='244' y='19' value='78'/><point x='268' y='88' value='53'/></graph></graphs></chart>",
                chart_settings: "<settings><background><alpha>100</alpha><border_alpha>20</border_alpha></background><plot_area><margins><left>55</left><right>45</right><top>65</top><bottom>45</bottom></margins></plot_area><grid><x><alpha>5</alpha></x><y><alpha>5</alpha><fill_color>000000</fill_color></y></grid><axes><x><width>1</width></x><y><width>1</width></y></axes><values><x><skip_first>0</skip_first></x><y><skip_first>0</skip_first></y></values><zoom><border_color>990000</border_color></zoom><legend><enabled>0</enabled></legend><bullets><hover_brightness>20</hover_brightness><grow_time>2</grow_time><sequenced_grow>1</sequenced_grow></bullets><graphs><graph gid='0'><color>B92F2F</color><alpha>0</alpha><balloon_text>{value}</balloon_text><bullet>bubble</bullet></graph></graphs><labels><label lid='0'><text><![CDATA[<b>Bubble chart example</b>]]></text><x>10</x><y>26</y><text_size>12</text_size><align>center</align></label></labels></settings>"
            };
            
            window.onload = function()
            {                
                // change == to != to test flash version
                if(AmCharts.recommended() == "js")
                {
                    var amFallback = new AmCharts.AmFallback();
                    // amFallback.settingsFile = flashVars.settings_file;       // doesn't support multiple settings files or additional_chart_settins as flash does
                    // amFallback.dataFile = flashVars.data_file;
                    amFallback.chartSettings = flashVars.chart_settings;
                    amFallback.chartData = flashVars.chart_data;
                    amFallback.pathToImages = "../../amcharts/javascript/images/";
                    amFallback.type = "xy";
                    amFallback.write("chartdiv");
                }
                else
                {
                    swfobject.embedSWF("../../amcharts/flash/amxy.swf", "chartdiv", "600", "400", "8.0.0", "../../amcharts/flash/expressInstall.swf", flashVars, params);
                }
            }
        
        </script>        
        
        <!-- end of amcharts script -->
        
        <!-- other parameters which can be passed with flashVars to swf:
        
        chart_data - data in csv or xml format;
        chart_settings - settings in xml format;
        additional_chart_settings - settings in xml format which will be appended to chart_settings or settings loaded from a file;
        loading_settings - string displayed while loading settings;
        loading_data - string displayed while loading data;
        preloader_color - hex color (#CC0000 for example) of a preloader bar;
        error_loading_file - string displayed if indicated file was not found.
        -->
        
    </body>
</html>
